<?
require_once("base/BaseGalleryForm.php");
require_once("cms/core/om/Image.php");

class GalleryForm extends BaseGalleryForm {

    private $log;

    public function __construct() {
        parent::__construct();
        $this->log =& LoggerManager::getLogger("GalleryForm");
        $this->getGallery()->setImageRelatedByImageId(new Image());
        $this->getGallery()->setImageRelatedByThumbnailId(new Image());
    }

    public function validate() {

        global $ALLOWABLE_IMAGES;

        $ALLOWABLE_IMAGES = array(
            "image/jpeg"=>"jpg",
            "image/pjpeg"=>"jpg",
            "image/gif"=>"gif",
            "image/png"=>"png"
        );

        $errors = parent::validate();
        return $errors;
    }

}
?>